package com.jtj.server.controller;


import com.jtj.server.pojo.Admin;
import com.jtj.server.service.IAdminService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author jtj
 * @since 2021-06-01
 */
@RestController
@RequestMapping("/system/admin")
public class AdminController {

    @Autowired
    private IAdminService adminService;

    @ApiOperation(value = "获取所有操作员")
    @PutMapping("/")
    public List<Admin> getAllAdmins(@RequestParam("keywords") String keywords) {
        return adminService.getAllAdmins(keywords);
    }
}
